package kr.co.goodwilldd.framework.security;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class ReloadAuthentication implements ApplicationContextAware {
	private ApplicationContext ctx;
	
	public void reloadAuthentication(String username) {
		ReloadAuthenticationEvent event = new ReloadAuthenticationEvent(username);
		ctx.publishEvent(event);
	}

	@Override
	public void setApplicationContext(ApplicationContext applicationContext)
			throws BeansException {
		this.ctx = applicationContext;
	}
}
